//
//  TestTableCollectionCVC.swift
//  CooperSwift_Example
//
//  Created by 计海峰 on 2022/1/24.
//  Copyright © 2022 CocoaPods. All rights reserved.
//

import UIKit
import CooperSwift

class TestTableCollectionCVCModel: NSObject, CollectionCellLongPressConfigProtocol {
    
    var model: Any?
    
    required init(_ model: Any?) {
        self.model = model
    }
    
    func cellCls() -> UICollectionViewCell.Type {
        return TestTableCollectionCVC.self
    }
    
}

class TestTableCollectionCVC: UICollectionViewCell {

    @IBOutlet weak var icon: UIImageView!
    
    override func bindTo(_ info: Any?) {
        super.bindTo(info)
        
        guard let cellModel = info as? TestTableCollectionCVCModel else { return }
        guard let config = cellModel.model as? TableShowBaseControlConfig else { return }
        config.loadAll(icon)
    
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

}
